extract only year from date python

38

extract only year from date python -

df['year'] = pd.DatetimeIndex(df['date']).year

Comments

Submit
0 Comments